import { _decorator, Component, Node } from 'cc'
const { ccclass, property } = _decorator

@ccclass('autoDestroy')
export class autoDestroy extends Component {
  start() {}

  update(deltaTime: number) {
    const position = this.node.position
    if (position.y <= -10) {
      this.node.destroy()
    }
  }
}
